#include <vector>
#include <set>
#include <iostream>
#include <unordered_map>
using namespace std;


vector<int> findDisappearedNumbers(vector<int>& nums) {
    vector<int> out = nums;
    for(int num : nums){
        out[num-1] = 0;
    }
    for(int i = out.size()-1; i >= 0; i--){
        if(out[i] == 0){
            out.erase(out.begin()+i);
        }else{
            out[i] = i + 1;
        }
    }
    return out;
}

int main(){
    vector<int> nums = { 4,3,2,7,8,2,3,1 };
    vector<int> out = findDisappearedNumbers(nums); 
    cout << out[0] << "," << out[1] << endl;
    return 0;
}